import container from "./container";
import formItem from "./formItem";
import tableItem from "./tableItem";
const dragStore = useDrag();
const createEditorConfig= ()=> {
  return {
    register: (component: IStdOListDrag) => {
      let hasIt = dragStore.registerConfig.componentList.find((item) => {
        return item.key == component.key;
      });
      if (hasIt) return;
      dragStore.registerConfig.componentList.push(component);
      dragStore.registerConfig.componentMap[component.key] = component;
    }
  };
}
const registerConfig = createEditorConfig();
export function initEditor() {
  container(registerConfig);
  formItem(registerConfig);
  tableItem(registerConfig);
}

